package com.woniuxy.food.app.apiImpl;

import com.woniuxy.cloud.mall95.log.Log;
import com.woniuxy.food.client.foodpicclient.FoodPicManageClient;
import com.woniuxy.food.service.FoodPicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;
import result.Result;

@RestController
public class FoodPicManageClientApiImpl implements FoodPicManageClient {
    @Autowired
    private FoodPicService foodPicService;
    @Override
    @Log("添加图片到商家图片库")
    public Result insertFoodPic(Integer storeId, String file) {
        foodPicService.insertFoodPic(storeId,file);
        return Result.success();
    }

    @Override
    @Log("从商家图片库删除图片")
    public Result deleteFoodPic(Integer storeId, Integer foodPicId) {
        foodPicService.deleteFoodPic(storeId,foodPicId);
        return Result.success();
    }
}
